package cn.com.yiqi.wsc.dao.lottery;

import cn.com.yiqi.wsc.dao.lottery.entity.ActivityTicketEntity;
import cn.com.yiqi.wsc.entity.lottery.LotteryActivityTicket;
import cn.com.yiqi.wsc.entity.lottery.LotteryActivityTicketExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface LotteryActivityTicketMapper {
    int countByExample(LotteryActivityTicketExample example);

    int deleteByExample(LotteryActivityTicketExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(LotteryActivityTicket record);

    int insertSelective(LotteryActivityTicket record);

    List<LotteryActivityTicket> selectByExample(LotteryActivityTicketExample example);

    LotteryActivityTicket selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") LotteryActivityTicket record, @Param("example") LotteryActivityTicketExample example);

    int updateByExample(@Param("record") LotteryActivityTicket record, @Param("example") LotteryActivityTicketExample example);

    int updateByPrimaryKeySelective(LotteryActivityTicket record);

    int updateByPrimaryKey(LotteryActivityTicket record);

    ActivityTicketEntity sumUserTimes(@Param("userId") Integer userId, @Param("activityId") Integer activityId);

    LotteryActivityTicket hasShare(@Param("userId") Integer userId,@Param("activityId") Integer activityId);

    ActivityTicketEntity getFirstUsableRecordId(@Param("customerId")Long customerId, @Param("activityId")Long activityId);

    Long getTicketTimeTotal(@Param("getType")Integer getType, @Param("customerId")Long customerId, @Param("activityId")Long activityId);


}